﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Card.Manager
{
    public partial class PaymentMethodEdit : BasePage
    {
        #region
        public string Code
        {
            get
            {                
                return Request.QueryString["c"] != null ? Request.QueryString["c"] : string.Empty;
            }
        }

        public string Area
        {
            get
            {
                return Request.QueryString["a"] != null ? Request.QueryString["a"] : string.Empty;
            }
        }
        #endregion

        #region
        protected override void OnInit(EventArgs e)
        {
            this.btnSave.Click += new EventHandler(btnSave_Click);
            this.btnBack.Click += new EventHandler(btnBack_Click);
            base.OnInit(e);
        }

        void btnSave_Click(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        void btnBack_Click(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.DoInit();
            }
        }
        #endregion

        #region
        private void DoInit()
        {
            this.DoBindArea();

        }

        private void DoBindArea()
        {
            this.dropArea.DataSource = BLL.SiteManagerMangager.GetAreaByManager(this.Passport.UserID, this.CPassport);
            this.dropArea.DataTextField = "CITY_NAME";
            this.dropArea.DataValueField = "CITY_CODE";
            this.dropArea.DataBind();
        }
        #endregion
    }
}
